package com.njit.control;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.njit.remote.FeignRemoteService;

import javax.annotation.Resource;


@RestController
public class FeignController {

    @Resource//类似于@Autowired
    FeignRemoteService feignRemoteService;

    @GetMapping(value = "/getHello")
    public String getHello(@RequestParam String name) {
        return feignRemoteService.hello(name);
    }

    @GetMapping(value = "/testzuul")
    public String testzuul(@RequestParam String name) {
        return name +",这是springcloud-feign-client的服务接口";
    }

//    @Value("${configword}")
//    String configword;
    @GetMapping(value = "/testconfig")
    public String testconfig(@RequestParam String name) {
        return name +",git配置值：";
    }

}
